package assetapi

import (
	ledgerapi "github.com/hyperledger/fabric-samples/asset-kx/chaincode-go/chaincode/ledger-api"
)

type AssetContractApi interface {
	CreateAsset(ctx ledgerapi.TransactionContextInterface, assetContent string) error
	ReadAssets(ctx ledgerapi.TransactionContextInterface, assetNos ...string) ([]Asset, error)
	ReadAsset(ctx ledgerapi.TransactionContextInterface, assetNo string) (Asset, error)
	AssetExists(ctx ledgerapi.TransactionContextInterface, assetNo string) (bool, error)
	DelAssets(ctx ledgerapi.TransactionContextInterface, assetNos ...string) error
	//对资产估值并更新资产估值，返回估值金额。当assetRuleContent=""时，使用已存储的估值规则进行估值
	ValuateAsset(ctx ledgerapi.TransactionContextInterface, assetNo string, assetRuleContent string) (string, error)
}
